import {date
} from "quasar";


export function  formatQuoteData(data) {
  let quoteList=[]
  data.forEach((item) => {

      let stime = parseInt(item.stime);
      let etime = parseInt(item.etime);
      let qTime = parseInt(item.qTime)
      let costTotal = parseInt(item.costTotal)
      if (costTotal >= 50000) {
          item.color = "pink-6";
      } else if (costTotal >= 10000 && costTotal <50000) {
          item.color = "teal-6";
      } else if (costTotal >= 5000 && costTotal <10000) {
          item.color = "yellow-8";
      } else if (costTotal <5000) {
          item.color = "blue-6";
      }
      item.stime = date.formatDate(stime, "YYYY/MM/DD");
      item.etime = date.formatDate(etime, "YYYY/MM/DD");
      item.qTime = date.formatDate(qTime, "YYYY/MM/DD HH:mm");

      quoteList.push(item);
  });

  return quoteList
}
